package com.shd.edanpei.ui.view;

import android.content.Context;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.shd.edanpei.R;
import com.shd.edanpei.bean.OrderDetailsModel;

/**
 * Created by mc on 2018/10/26.
 * yang-wen-wen
 */

public class OrderInfoView extends LinearLayout {

    private Context context;
    TextView tvTime;
    private OrderDetailsModel model;

    public OrderInfoView(Context context, OrderDetailsModel model) {
        super(context);
        this.model = model;
        initView(context);
    }

    public OrderInfoView(Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
        initView(context);
    }

    public OrderInfoView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        initView(context);
    }

    private void initView(Context context) {
        this.context = context;

        inflate(context, R.layout.order_time_info, this);

        tvTime = findViewById(R.id.order_time_info);

        tvTime.setText(model.getBaseInfo().getTimeInfo());

    }
}
